#include <stdio.h>
#include <unistd.h>
#include <signal.h>

struct sigaction oldact;
void sigcall(int signo)
{
    printf("i am sigcall,signo:%d\n",signo);
    sigaction(2,&oldact,NULL);
}

int main()
{
    struct sigaction act;
    act.sa_handler = sigcall;
    sigemptyset(&act.sa_mask);
    sigaction(2,&act,&oldact);
    act.sa_flags = 0;
    while(1)
    {

    }
    return 0;
}
